App.require(function () {
    App.defineWidgetBehavior("remove", {
        render: function (ctx) {
            
        },
        initialize: function () {
            this.attachDiyEvent("keyup", this.keyUpHandler);
        },
        keyUpHandler: function (ev) {
            var scene = this.target.getScene();
            if (ev.originEvent.key === "Delete" && scene.activeWidget == this.target) {
                scene.removeWidget(this.target);
            }
        },
    });
})